package com.iwhalecloud.bss.kite.cucc.service.attr;

import com.iwhalecloud.bss.kite.cucc.client.api.attr.IBankBranchService;
import com.iwhalecloud.bss.kite.cucc.client.dto.attr.BankBranch;
import com.iwhalecloud.bss.kite.cucc.dataservice.cache.SubBankBranchCache;
import com.iwhalecloud.bss.kite.cucc.dataservice.mapper.BankBranchMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName : BankBranchService
 * @Description : 银行
 * @Author : chen.cheng110
 * @Date : 2020/12/08 15:15
 */
@Service
public class BankBranchService implements IBankBranchService {
    @Resource
    private BankBranchMapper bankBranchMapper;

    //所属银行 精确查找
    @Override
    public List<BankBranch> listSuperBankName(String bankCode) {
        return SubBankBranchCache.getSuperBankName(bankCode);
    }

    //可选所有下属银行
    @Override
    public List<BankBranch> listSubBankName(String bankCode) {
        return SubBankBranchCache.getSubBankName(bankCode);
    }

    //搜索可选下属银行
    @Override
    public List<BankBranch> qryListSubBankName(String subBankName) {
        return SubBankBranchCache.getQrySubBankName(subBankName);
    }
}
